<template>
  <div>
    <Header/>
    <router-view></router-view>
    <!-- <Footer v-if="$route.name!=='Login'&&$route.name!=='Register'"/> -->
    <Footer v-if="FooterIsShow"></Footer>
  </div>
</template>

<script>
import Header from "@/components/Header"
import Footer from "@/components/Footer"
export default {
    name:"App",
    mounted(){
      console.log(this.$route);
    },
    components:{
        Header,
        Footer
    },
    data(){
      return{
        FooterHiddenList:["Register","Login"]
      }
    },
    computed:{
      FooterIsShow(){
        //1.普通判断写法
        // return this.$route.name!=='Login'&&this.$route.name!=='Register'
        //2.白名单写法
        // return !this.FooterHiddenList.includes(this.$route.name)
        //3.路由元信息
        return !this.$route.meta.isFooterHidden
      }
    }
}
</script>

<style scoped lang="less">

</style>